<template>
<div class="col-md-12">
  <rd-widget>
    <rd-widget-header :header="header">
    </rd-widget-header>
    <rd-widget-body>
      <my-list :list="list"></my-list>
    </rd-widget-body>
  <rd-widget>   
</div>
</template>

<script>
import _ from 'lodash'
import {http} from 'share/server/api.js'
import locales from '../locales/systemInfo.js'
import {List} from '../configs/systemInfo.js'

export default {
  locales,
  data () {
    return {
      header: {
        icon: 'fa fa-list',
        title: this.$t("title")
      },
      list: new List(this)
    }
  },
  vuex: {
    getters: {
      platform: (state) => state.system.platform
    }
  },
  methods: {
    loadData (data) {
      _.forEach(this.list, (item) => {
        if (typeof data[item.field] != 'undefined') {
          item.value = data[item.field]
        }
      })      
    }
  },
  ready () {
    this.loadData(this.platform)
  }
}
</script>

<style>
</style>